﻿<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>新建页面</title>
		<!-- jquery -->
		<script src="https://tanyue.gitee.io/my-tools/js/jquery-3.4.1.min.js"></script>
		<script src="FoxTool.js"></script>
		<!--  -->
		<!-- 引入CSS -->
		<!-- 引入JS -->
		
	</head>
	<body>

		<div>
			<!-- html内容 -->
			<h1>hello</h1>
			<img id="uploadimg" src="upload.png">

			<!-- html内容结束 -->
		</div>

		<!-- 本页面JS代码 -->
		<script>
            //"use strict";//开启严格模式
			let a=new FoxUpload({
				url:'http://tp5.cc/index/index/imguplaod',//图片上传路径
				uploadimgID:'uploadimg',//默认图id
				uploadButtonID:'uploadimg',//触发上传id
				lodingpath:'loding.gif',//上传中的加载替换图(非必填)
				success:function (data){//上传结果
					data=JSON.parse(data);
                	console.log('返回结果2',data);
					a.setimgsrc(data.data);//设置图片
					console.log(a.getimgpath());//获取图片
					
            	}
			});
		</script>
	</body>
</html>
